Guild icon
Project Sekai
🔒 CrewCTF 2023 / ✅-misc-fighter_jet
Avatar
Fighter_jet - 1000 points
Category: Misc Description: Come check out our new plane, the THC-16! It's got an awesome state of the art radar and radar warning receiver that gives tons of info! We just haven't gotten around to building the part that intereprets the data yet. Maybe you can help us on your test flight? We've got some test data we can give you, but after that you're on your own. You'll need to determine whether new radar contacts are friendly or enemy. If you can get 90% right then we'll call that a success! For the radar warning receiver you'll need to distinguish between a ground radar locking you and a missile launch. You'll need to launch countermeasures if it's a missile launch. There is no margin for error here. Author: LinuxBro nc fighterjet.chal.crewc.tf 40001 Files: No files. Tags: No tags.
Sutx pinned a message to this channel. 07/07/2023 10:02 PM
Avatar
@enscribe wants to collaborate 🤝
Avatar
@Surg wants to collaborate 🤝
Avatar
there is a bunch of lock/launch after the data
01:25
ok so there is radio data and rwr data
01:27
radio data 10 dim, rwr 3 dim, weird.. i was assuming radio data is the actual data, then rwr data are train set
Avatar
@Violin wants to collaborate 🤝
Avatar
@Legoclones wants to collaborate 🤝
Avatar
Avatar
sahuang
radio data 10 dim, rwr 3 dim, weird.. i was assuming radio data is the actual data, then rwr data are train set
kinda too guessy, basically 2 sets of binary data, first set has dim 10 second dim3, and we need to build the classifier based on first, then train second and predict inputs but i have little idea why their dim doesnt match
Avatar
wait is this the ML one?
Avatar
yeah
Avatar
shouldnt be hard, i just cant work on it rn
06:38
3 solves already
Avatar
idk ML msfrog will u be able to solve at some point?
Avatar
idts
06:39
also idk ML too, just find random docs and try
06:39
in fact this may or may not be ML depending on the data given
Avatar
let me read more about the description
06:52
i think i still didnt fully understand the info
06:54
DUMPING PRIOR RADAR DATA 6.367055039289703,0.14929640237488623,-0.1804751685355639,9.063589897217922,-8.462679767550664,-9.522784378997551,-8.534154068111103,7.405369299400735,5.68800574515817,6.253355533975407,FRIENDLY 0.9220112982712879,4.55406027061954,1.4766102234152765,1.0327673642434532,-0.09791864185107468,2.3389504197232576,-2.2684893178207632,8.732543694179428,9.139365673010275,-2.2447658390116523,BANDIT ...... DUMPING PRIOR RWR DATA -0.10528410529750024,0.7137860299568659,0.0,MISSILE LAUNCH 0.9933574488386961,0.005606370727041129,0.0,GROUND RADAR LOCK -0.5002389359959747,-0.5198484352554837,0.0,MISSILE LAUNCH ...... SPIKE! -0.8379939128039027,0.19957742935917555,0.5328467496143284 Is this an incoming missile? [Y/N]:
06:54
whats friendly/bandit vs ground radar lock/missile launch?
06:55
looking at the coordinates they have some relation
06:55
@Legoclones bandit means missile launch?
06:55
in english context
06:56
also idk whats ground radar loxk
06:57
i have a few guesses but idk which is right cuz i cant calculate rn
Avatar
friendly is good, bandit is bad
06:59
"Bandit" is an identified unfriendly aircraft
Avatar
radar lock when good?
07:00
missile launch when bad?
07:01
oh lmao
07:01
they have 2 types of queries
07:01
so those seem 2 separate datasets
07:02
missile and friendly or not
07:02
i see
07:02
this seems very doable lol
07:04
just build 2 separate binary supervised model then predict
Avatar
okay I'm super confused what the data means
Avatar
There are 2 datasets, the first have entries of 10 dimensions and a label, the second is 3 dimension. Both datasets have 2 labels only, so it is a binary classification
07:05
You dont need to know what each float value means
Avatar
so how can we use labels to predict missile from spike?
Avatar
After training 2 models based on each of the dataset, predict based on input
Avatar
ohh
Avatar
if input is dimension 3, use the second model
07:06
if 10, use first
Avatar
so input numbers to model, model will make sense of it and determine if it's good or bad based on previous data
Avatar
based on the given dataset
Avatar
missile launch bad, bandit bad
Avatar
those 2 are unrelated
07:07
they give 2 separate datasets
Avatar
yes
Avatar
each is binary classifier
Avatar
but if they give 10 numbers, use first dataset, and bandit means bad
Avatar
if they give 3 numbers, use second dataset and missile launch means bad
Avatar
their question is, is it friendly for dim 10 (edited)
07:07
second question is whether missile launch
Avatar
how would i even code this lol
07:09
use same code to train and predict
07:09
its simple actually
07:09
just import, add data, train, predict
Avatar
alright I will try it
07:10
this is good intro to some ml msfrog
Avatar
if you can follow and make a template code ill also check later
Avatar
cool
Avatar
okay looks like nearest neighbor classification system would work
07:19
gotta retrieve data, parse into pandas df, use as training data, then output to nc session
Avatar
idk if knn works, cuz binary classifier
07:41
knn is unsupervised, may work if dataset is good
07:41
otherwise can try logistic in that blog
Avatar
okay was able to turn incoming data into data frame and capture query
07:48
now need to train model
07:49
I'll try the link u sent me
07:50
What I have so far
1.39 KB
Avatar
Avatar
Legoclones
okay was able to turn incoming data into data frame and capture query
yeah
Avatar
lol it says "train the model" but no code 🤣 😭
08:00
wait maybe code at the bottom
08:00
wtf
Avatar
check doc
08:02
.train or sth
Avatar
Okay here is updated with linear regression model. I temporarily split it 75% train, 25% test then printed out how good it is. Not very good lol
2.26 KB
08:26
Avatar
okay actually I think it does work right
08:37
I'm guessing data is randomly generated, which is why splitting test data into test and train is bad.
08:37
let me finish scripting this
Avatar
Avatar
Legoclones
I'm guessing data is randomly generated, which is why splitting test data into test and train is bad.
oh maybe?
08:43
then what you gonna use, nearest neighbour?
Avatar
sticking with logical regression for now, if it doesn't work i might switch over
08:43
logical regression has given good results so far
Avatar
hmm now it's almost always wrong 😭
Avatar
almost always?
08:53
reverse the submission result then
Avatar
we can sanity check w admin if logistic regression makes sense, not too sure
08:53
or knn
Avatar
😂 1
Avatar
successfully got through only 9
09:01
i dont think it's working right, lemme try a bit more, and switch over to knn
09:05
knn not much better
09:05
I'll message admin and send script in here if anyone has any suggestions
09:05
Currently, SPIKE means 3 points in query, and I have this doing KNN. BOGEY means 10 points in query, and I have this doing linear regression
3.34 KB
Avatar
they said 90% correct, why it exits when one is wrong?
Avatar
idk
09:21
finally figured out how modmail works lol
09:21
that is jank (edited)
Avatar
"You'll need to determine whether new radar contacts are friendly or enemy. If you can get 90% right then we'll call that a success! For the radar warning receiver you'll need to distinguish between a ground radar locking you and a missile launch. You'll need to launch countermeasures if it's a missile launch. There is no margin for error here. "
09:21
you can have 90% acc on friends/enemy
09:21
missile is 100% acc
Avatar
missile is the 3 dim one?
Avatar
yeah
Avatar
so maybe they have two different algos
09:22
missile one maybe knn?
09:23
nearest neighbour or whatever
09:23
that is 100% correct, logictic regression has chances of failure
09:23
thats just a guess
09:24
i wonder why they split to two different datasets, possible explanation is two models
Avatar
knn and regression both aren't very accurate for missiles
09:24
I seem to be doing okay with bogeys, but missiles is the big problem
Avatar
yeah 3 dimensions
09:25
can you plot the xyz coords?
09:25
and observe if theres any rule
Avatar
got any shortcuts for plotting dataframes?
Avatar
just matplotlib on xyz
Avatar
yoooo that's kinda dope
09:36
this is what it looks like from one side
09:36
kind of like a football or rugby ball
09:37
now gotta color code based on bogey or not msfrog
09:40
okay yeah inside vs outside
Avatar
lol mod "the solution works here so i guess keep trying"
09:52
finally figured out how to add query in there
09:52
now just gotta label, then maybe manually will work
Avatar
welp
10:09
even looking at it, it's still hard to know if it's good or bad
10:09
I only get it right 50% of the time lol
10:09
And now I keep getting bogey ones wrong....
10:09
Idk what I'm doing wrong
Avatar
try dim reduction?
Avatar
3d -> 2d?
Avatar
that or 10d -> 2d
10:10
PCA does wonders sometimes
Avatar
oh wait
10:11
i'm just dum hold up
Avatar
Avatar
Legoclones
finally figured out how to add query in there
is there any rule
Avatar
yeah lemme illustrate
11:32
it's not super easy to tell, but this is what I have so far. In 3d mode, it's always pretty hard to see, but if you put in this orientation, its clearer. If it's inside the hexagon, it's the light blue. If it's outside, it's purple. Legend will tell on the right which color is good.
Avatar
okay it's just so hard to tell manually
11:58
okay tbh don't know where to go from here either, I'll keep trying but idk why binary classification doesn't work, and it's so hard to tell manually
Avatar
leave your scripts, i will check tonight if free
12:05
I'm having some real skill issues today 😭
12:05
feel like I can't solve anything today
Avatar
I've been trying different things, like which quadrant it's in, how close it is to any other dot, how close it is to a "good" dot, etc., and still don't always get it right
12:25
Going by distance from a "good" dot has gotten me closest, can do like 4 in a row, but even that's only 80% accurate, and idk how many tests they have
Avatar
is the missile one 100% win now?
12:26
by plot or scripting?
Avatar
no, the missile one is 80%
12:26
by plot
12:26
so plot doesnt work?
Avatar
the scripting non-missile one works great
12:27
10 dim one works 90%?
Avatar
around 90% yeah, closer to 100% lol
Avatar
if its an inside/outside correlation
12:27
maybe going to 2D will net better scripting results
12:28
idk how much eyeballing you can pull off, and it might just be 1000 tests
Avatar
its 3d
12:28
real world 3d missile
Avatar
sure..., but say we take every data point to be a line segment from origin
12:30
visually, it looks like the first 90% of that segment is not a missle, where the last 10% is (numbers are arbitrary here)
12:31
but the direction of that segment doesn't seem to have any correlation
12:31
so, in theory, thats a rendudant dimension
Avatar
alright admin said 30 tests
12:37
lol how does this make sense. Them: "Is it a missile?" Me: "Yes, it's a missile. Take countermeasures" Them: "Okay. Oh no! A missile hit us!"
Avatar
okay I wonder if something is wrong with my script
12:48
The "DISPENSING COUNTERMEASURES" should only ever appear when I type Y
12:48
and yet
12:52
yeah maybe that's why 👀
Avatar
Avatar
sahuang
reverse the submission result then
Did you follow this advice and forget to change it :p
Avatar
I literally sent N and it thought it was Y...
12:53
this is the code
12:54
Anything that's not 'N'is interpreted as yes
12:54
So I always do uppercase
12:57
BRO ITS THE NEWLINE
12:58
I SWEAR I CHECKED FOR THAT
Avatar
I thought that
12:58
But I also thought input strips it
12:58
(Which is why I deleted it)
Avatar
sameee
Avatar
Just check first character
12:58
To be N
12:58
Anything else is yes
Avatar
I just did 'N' in rec
12:59
regardless of location lol
13:02
okay I think I got this now
13:02
I think it depends on which it's closer to
13:02
just got 6 in a row
13:02
now that I know it's actually sending the right results smh
Avatar
Avatar
Legoclones
used /ctf solve
✅ Challenge solved.
Avatar
golly that took WAYY too long
13:07
if closer to purple dots, then GOOD (send N). if closer to green dots, then BAD (send Y)
13:07
got right 10x in a row
13:07
finally did something lol
Avatar
lmaoo
13:29
nice
Exported 214 message(s)